<%@ page import="com.pandorasoft.shiro.ShiroModule" %>



<div class="fieldcontain ${hasErrors(bean: shiroModuleInstance, field: 'name', 'error')} required">
	<label for="name">
		<g:message code="shiroModule.name.label" default="Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="name" value="${shiroModuleInstance?.name}" />
</div>

<div class="fieldcontain ${hasErrors(bean: shiroModuleInstance, field: 'controllerName', 'error')} ">
	<label for="controllerName">
		<g:message code="shiroModule.controllerName.label" default="Controller Name" />
		
	</label>
	<g:textField name="controllerName" value="${shiroModuleInstance?.controllerName}" />
</div>

<div class="fieldcontain ${hasErrors(bean: shiroModuleInstance, field: 'actionName', 'error')} ">
	<label for="actionName">
		<g:message code="shiroModule.actionName.label" default="Action Name" />
		
	</label>
	<g:textField name="actionName" value="${shiroModuleInstance?.actionName}" />
</div>

<div class="fieldcontain ${hasErrors(bean: shiroModuleInstance, field: 'root', 'error')} ">
	<label for="root">
		<g:message code="shiroModule.root.label" default="Root" />
		
	</label>
	<g:select name="root" from="${shiroModuleInstance.constraints.root.inList}" value="${shiroModuleInstance?.root}" valueMessagePrefix="shiroModule.root"  />
</div>

<div class="fieldcontain ${hasErrors(bean: shiroModuleInstance, field: 'parent', 'error')} ">
	<label for="parent">
		<g:message code="shiroModule.parent.label" default="Parent" />
		
	</label>
	<g:select name="parent.id" from="${com.pandorasoft.shiro.ShiroModule.list()}" optionKey="id" value="${shiroModuleInstance?.parent?.id}" noSelection="['null': '']" />
</div>

<div class="fieldcontain ${hasErrors(bean: shiroModuleInstance, field: 'childrens', 'error')} ">
	<label for="childrens">
		<g:message code="shiroModule.childrens.label" default="Childrens" />
		
	</label>
	
<ul>
<g:each in="${shiroModuleInstance?.childrens?}" var="c">
    <li><g:link controller="shiroModule" action="show" id="${c.id}">${c?.encodeAsHTML()}</g:link></li>
</g:each>
</ul>
<g:link controller="shiroModule" action="create" params="['shiroModule.id': shiroModuleInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'shiroModule.label', default: 'ShiroModule')])}</g:link>

</div>

